<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/12/19 0019
 * Time: 21:19
 */

namespace app\admin\model;


use think\Model;

class Kcb extends Model
{
    protected $name = 'kcb';
    protected $pk = 'kcid';
    public function ksbs()
    {
        return $this->hasMany('Ksb','ofkc');
    }

    public function getList(){
        return  $this->select();
    }

    public function getKc($no){
        return $this->where(['no'=>$no])->find();
    }
    public function getKc2($kcid){
        return $this->where(['kcid'=>$kcid])->find();
    }
    public function getcx($name){
        return $this->where(['name'=>$name])->find();
    }
}